export const formItems = [
  {
    label: '企业ID',
    name: 'id',
    type: 'input',
  },
  {
    label: '企业名称',
    name: 'name',
    type: 'input',
  },
  {
    label: '手机号码',
    name: 'mobile',
    type: 'input',
  },
  {
    label: '状态',
    name: 'status',
    span: 8,
    type: 'select',
    itemProps: {
      options: [
        {
          label: '正常',
          value: 0,
        },
        {
          label: '冻结',
          value: 1,
        },
      ],
    },
  },
  {
    label: '创建日期',
    name: 'times',
    span: 8,
    // valueFields: ['startTime', 'endTime'],
    valueType: 'string',
    value: [],
    type: 'range-picker',
    itemProps: {
      format: 'YYYY-MM-DD',
    },
  },
];

export const columns = [
  {
    title: '操作',
    dataIndex: 'action',
    width: 200,
    slots: { customRender: 'action' },
  },
  // {
  //   title: '序号',
  //   dataIndex: 'name',
  //   key: 'name',
  // },
  {
    title: '企业ID',
    dataIndex: 'id',
    key: 'id',
    width: 100,
  },
  {
    title: '企业名称',
    dataIndex: 'name',
    key: 'name',
    width: 200,
  },
  {
    title: '手机号码',
    dataIndex: 'mobile',
    key: 'mobile',
    width: 200,
  },
  {
    title: '企业地址',
    dataIndex: 'address',
    key: 'address',
    width: 200,
  },
  {
    title: '创建时间',
    dataIndex: 'create_time_s',
    key: 'create_time_s',
    width: 200,
  },
  {
    title: '企业二维码',
    dataIndex: 'url',
    key: 'url',
    width: 200,
    slots: { customRender: 'url' },
  },
  {
    title: '状态',
    dataIndex: 'status',
    key: 'status',
    width: 100,
    customRender(row) {
      return row.record.status == 0 ? '正常' : '冻结';
    },
  },
];
